<?php
session_start();
      if (isset($_SESSION['k_username'])) {
		include('conexion.inc.php');
  $link=Conectarse();
  mysql_select_db("gotica_ordencompras" ,$link);  
echo "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />";
echo "<title >Productos</title>";
?>
<style type="text/css">
<!--BODY {
	background-color: #EBEBEB;
	margin-left: 20px;
	margin-top: 20px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-size: 90%;
}
TD{
	font-family: Verdana, Helvetica, sans-serif;
 	font-size: 12px
}
H1 {
	font : bold 14pt  Verdana, Tahoma, sans-serif;
	text-align : left;
	margin-bottom : 0;
	margin-left : 0;
	margin-right : 0;
	margin-top : 0;
}
H1.mess {
	font : bold 14pt Verdana, Tahoma, sans-serif;
	text-align : center;
	color : red;
	margin-bottom : 0;
	margin-left : 0;
	margin-right : 0;
	margin-top : 0;
}
TR.data{
	background : #A6A6A6;
	font-family: Verdana, Helvetica, sans-serif;
 	font-size: 12px
}
TR.dataheader{
	font-family: Verdana, Helvetica, sans-serif;
	background : #808080;
	font-weight : bold;
	text-align : center;
	font-size: 12px
}
H2{
	font : bold 13px Verdana, Tahoma, sans-serif;
	text-align : center;
	margin-bottom : 0;
	margin-left : 0;
	margin-right : 0;
	margin-top : 0;
}
P {
	margin : 3;
}
A {
	font: Verdana, Tahoma, sans-serif;
	color : blue;
	font-size: 16px;
}
A:HOVER {
	font: Verdana, Tahoma, sans-serif;
	color : red;
	text-decoration : underline;
}
/*A:LINK {
text-decoration : none;
}
*/
A:VISITED {
	font: Verdana, Tahoma, sans-serif;
	text-decoration : none;
}
A.menu {
	font: bold 12px Verdana, Tahoma, sans-serif;
	color : #B75E0B;
	text-decoration : none;
}
A.menu:HOVER {
	font: Verdana, Tahoma, sans-serif;
	color : Navy;
}
A.menuACT {
	font: bold 12px Verdana, Tahoma, sans-serif;
	color : red;
	text-decoration : none;
}
/* FORM CLASSES */
.INPUTmy {
	border : 1px solid #000080;
	background : White;
	font-family : Courier New;
	font-size : 12px;
}
.INPUTmyERR {
	border : 1px solid Black;
	font-family : Courier New;
	font-size : 12px;
	background : #CC6633;
}
.INPUTmyACT {
	border : 1px solid #990033;
	background : #FFFFCC;
	font-family : Courier New;
	font-size : 12px;
	color : #000099;
}
.BUTTONmi {
	font-family: Verdana, Tahoma, sans-serif;
	font-size: 12px;
	color: black ;
	background-color: #EBEBEB;
	border: 1px solid Black;
	width : 70px;
}
.BUTTONmySmall {
	font-family: Verdana, Tahoma, sans-serif;
	font-size: 12px;
	color: black ;
	background-color: #CCCCCC;
	border: 1px solid Black;
}
.ERROR_HEADER{
	color: red;
	font : bold;
	text-align : center;
}
.ERROR_ELEMENT{
	color: red ;
}
/* END FORM CLASSES*/
.header {
	color : Teal;
	text-align : center;
	font : bold 13px;
}
-->
</style>



<?
echo "<style type=\"text/css\">";
echo "<!--
.Estilo1 {font-size: 24px}
-->
</style>";

?>
</head>
<body>
<div align="center" ><h1>Proveedores<h1></div>

<table width="100%" border="0" cellspacing="2" cellpadding="2" align="center" >
<tr align="center" class="dataheader">
<td>Editar</td>
<td>Borrar</td>
<td>Nombre</td>
<td>Telefono</td>
<td>Direccion</td>
<td>RUC</td>
</tr>
<?
$sql2= "SELECT * FROM proveedor ";
$result2 = mysql_query($sql2, $link);

while ($row2= mysql_fetch_array($result2)){

echo "<tr class=\"data\">";
echo "<form method=\"post\" action=\"edicionprov.php\">";
echo "<td width=\"3%\"><input type=\"hidden\" name=\"idproveedor\" value=\"$row2[idproveedor]\" /><input type=\"submit\" class=\"buttonmi\" name=\"ver\" value=\"Editar\" /></td>";
echo "</form>";
echo "<form method=\"post\" action=\"borraprov.php\">";
echo "<td width=\"3%\"><input type=\"hidden\" name=\"idproveedor\" value=\"$row[idproveedor]\" /><input type=\"submit\" class=\"buttonmi\" name=\"ver\" value=\"Borrar\" /></td>";
echo "</form>";
echo "<td>";
echo $row2['N_proveedor'];
echo "</td>";
echo "<td>";
echo $row2['T_telefono'];
echo "</td>";
echo "<td>";
echo $row2['T_direccion'];
echo "</td>";
echo "<td>";
echo $row3['T_RUC'];
echo "</td>";
echo "</tr>";

	
	}


?>
</table>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>
